<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.entity.Concept.getBelief</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/d22/classnars_1_1entity_1_1Concept_a37e00599fc19c5931da40bd446890f89.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a37e00599fc19c5931da40bd446890f89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> nars.entity.Concept.getBelief </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a>&#160;</td>
          <td class="paramname"><em>task</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Select a isBelief to interact with the given task in inference. </p>
<p>get the first qualified one </p>
<p>only called in <a class="el" href="../../da/de3/classnars_1_1inference_1_1RuleTables_ac2d01dfdc40bdd47c757cb549217e6e3.html#ac2d01dfdc40bdd47c757cb549217e6e3" title="Entry point of the inference engine. ">RuleTables.reason</a> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">task</td><td>The selected task </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The selected isBelief </dd></dl>

<p>Definition at line <a class="el" href="../../df/d62/Concept_8java_source.html#l00385">385</a> of file <a class="el" href="../../df/d62/Concept_8java_source.html">Concept.java</a>.</p>

<p>References <a class="el" href="../../da/d1c/Sentence_8java_source.html#l00122">nars.entity.Sentence.clone()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00658">nars.storage.Memory.getNewStamp()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00111">nars.storage.Memory.getRecorder()</a>, <a class="el" href="../../d6/d10/Task_8java_source.html#l00099">nars.entity.Task.getSentence()</a>, <a class="el" href="../../da/d1c/Sentence_8java_source.html#l00173">nars.entity.Sentence.getStamp()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00119">nars.storage.Memory.getTime()</a>, <a class="el" href="../../d8/d4f/Stamp_8java_source.html#l00119">nars.entity.Stamp.make()</a>, and <a class="el" href="../../db/d0c/Memory_8java_source.html#l00662">nars.storage.Memory.setNewStamp()</a>.</p>

<p>Referenced by <a class="el" href="../../d1/d5e/RuleTables_8java_source.html#l00045">nars.inference.RuleTables.reason()</a>.</p>
<div class="fragment"><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;                                         {</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        Sentence taskSentence = task.getSentence();</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        Sentence belief;</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">beliefs</a>.size(); i++) {</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            belief = <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">beliefs</a>.get(i);</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;            <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aa4c7e1f5823d0404c0cab49b617968f1.html#aa4c7e1f5823d0404c0cab49b617968f1">getRecorder</a>().append(<span class="stringliteral">&quot; * Selected Belief: &quot;</span> + belief + <span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;            <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778.html#aa8d87fbd9fbd6229e88184fd23553778">setNewStamp</a>(Stamp.make(taskSentence.getStamp(), belief.getStamp(), <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53.html#aaa97540563b646b33db1263fa3a97d53">getTime</a>()));</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7.html#a09af34150e8562d5c93170388c8804b7">getNewStamp</a>() != null) {</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;                Sentence belief2 = (Sentence) belief.clone();   <span class="comment">// will this mess up priority adjustment?</span></div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;                <span class="keywordflow">return</span> belief2;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;            }</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        }</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2_html_a8b68e5eb605ffd96cf53c86b5368caa2"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">nars.entity.Concept.beliefs</a></div><div class="ttdeci">ArrayList&lt; Sentence &gt; beliefs</div><div class="ttdoc">Sentences directly made about the term, with non-future tense. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00061">Concept.java:61</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7_html_a09af34150e8562d5c93170388c8804b7"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7.html#a09af34150e8562d5c93170388c8804b7">nars.storage.Memory.getNewStamp</a></div><div class="ttdeci">Stamp getNewStamp()</div><div class="ttdoc">The new Stamp. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00658">Memory.java:658</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778_html_aa8d87fbd9fbd6229e88184fd23553778"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778.html#aa8d87fbd9fbd6229e88184fd23553778">nars.storage.Memory.setNewStamp</a></div><div class="ttdeci">void setNewStamp(Stamp newStamp)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00662">Memory.java:662</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53_html_aaa97540563b646b33db1263fa3a97d53"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53.html#aaa97540563b646b33db1263fa3a97d53">nars.storage.Memory.getTime</a></div><div class="ttdeci">long getTime()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00119">Memory.java:119</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c_html_a2ab0b0c82e09c852076ce4c90c502d4c"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">nars.entity.Concept.memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">Reference to the memory. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00063">Concept.java:63</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aa4c7e1f5823d0404c0cab49b617968f1_html_aa4c7e1f5823d0404c0cab49b617968f1"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aa4c7e1f5823d0404c0cab49b617968f1.html#aa4c7e1f5823d0404c0cab49b617968f1">nars.storage.Memory.getRecorder</a></div><div class="ttdeci">IInferenceRecorder getRecorder()</div><div class="ttdoc">Inference record text to be written into a log file. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00111">Memory.java:111</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a37e00599fc19c5931da40bd446890f89_a37e00599fc19c5931da40bd446890f89_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a37e00599fc19c5931da40bd446890f89_a37e00599fc19c5931da40bd446890f89_icgraph.svg" width="100%" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../db/dec/namespacenars_1_1entity.html">entity</a></li><li class="navelem"><a class="el" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
